/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Row, Col, Card } from "antd";
import React from "react";
import style from "../style";

const HeaderContent = props => {
  const { cardStyle, colSpanNum } = style.headerContent;
  const { data = {} } = props;
  const { freight, payNum, todayCloseOrderNum, todayOrderNum, todayOverNum } = data;
  return (
    <Row style={{ width: "100%" }}>
      <Col span={colSpanNum}>
        <Card title="今日订单量" style={cardStyle} bordered={false}>
          {todayOrderNum}
        </Card>
      </Col>
      <Col span={colSpanNum}>
        <Card title="今日取消量" style={cardStyle} bordered={false}>
          {todayCloseOrderNum}
        </Card>
      </Col>
      <Col span={colSpanNum}>
        <Card title="今日完成订单" style={cardStyle} bordered={false}>
          {todayOverNum}
        </Card>
      </Col>
      <Col span={colSpanNum}>
        <Card title="今日线上运费" style={cardStyle} bordered={false}>
          {freight}
        </Card>
      </Col>
      <Col span={8}>
        <Card title="今日线上运费支付笔数" style={cardStyle} bordered={false}>
          {payNum}
        </Card>
      </Col>
    </Row>
  );
};

export default HeaderContent;
